package com.cubesugar2014.keepup;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

public class SBroadReceiver extends BroadcastReceiver {
    
    @Override
    public void onReceive(Context context, Intent intent) {
    	
    	
    	if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction()))
    	{
    		context.startService(new Intent("com.cubesugar2014.keepup.service"));  
    		//startService(new Intent("arabiannight.tistory.com.service"));
    		
    		 //_startTimer();
    		//Toast.makeText(context, "SReceiver work", Toast.LENGTH_LONG).show();
    		  //Intent intent = new Intent(this, ItemListActivity.class);
    		  //startActivity(intent);
    		/*
    		//start activity
            Intent i = new Intent();
            i.setClassName("com.cubesugar2014.keepup", "com.cubesugar2014.keepup.ItemListActivity");
            i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK );
            i.putExtra("Boot", true);
            context.startActivity(i);
    		*/
    		// assumes WordService is a registered service
    	    //Intent intent2 = new Intent(context, ItemListActivity.class);
    	    //context.startService(intent2);
    	
    	}
    	
    }
}